#pragma once

namespace ukuiwaylandclient
{

class wl_display_t;
class wl_registry_t;
class wl_compositor_t;
class xdg_wm_base_t;
class wl_shm_t;

class display
{
public:
    display();
    ~display();

    bool isInitialized() const;

    void roundtrip();
    int dispatch();

    wl_compositor_t *compositor();
    xdg_wm_base_t *xdgWmBase();
    wl_shm_t *shm();

private:
    wl_display_t *m_wl_display = nullptr;
    wl_registry_t *m_wl_registry = nullptr;
    wl_compositor_t *m_wl_compositor = nullptr;
    wl_shm_t *m_wl_shm = nullptr;
    xdg_wm_base_t *m_xdg_wm_base = nullptr;

    void init();
};

};